<!--
 * @Author: wangjh wangjiahui0710@163.com
 * @Date: 2024-06-11 18:09:29
 * @LastEditors: wangjh wangjiahui0710@163.com
 * @LastEditTime: 2024-06-12 14:08:55
 * @FilePath: \cip-mobile\src\pages\login\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 创建单位页 -->
<script lang="ts" setup>
import type { FireInspectionPerson } from '@/genapi/fireProduct';
import { fireProductFireApiInspectionPersonJobQuerybyPost } from '@/genapi/fireProduct';
import { useUserStore } from '@/stores/user';
import { whManagerBsTbParkGridPatrolRecordGetDetailByIdIdUsingGet, whManagerBsTbThirdUnitGetAppPageUsingPost, whManagerBsTbThirdUnitRegisterUsingPost } from '@/genapi/wh';
import { ref } from 'vue';

defineOptions({ name: 'InspectionFinish' });
const userStore = useUserStore();

const router = useRouter();
let form = ref('')
onMounted(async() => {
  // console.log(router.currentRoute.value.query.id)
  let {data} = await whManagerBsTbParkGridPatrolRecordGetDetailByIdIdUsingGet(router.currentRoute.value.query.id)
  form.value = data
  // console.log('form',form.value)
})


// const form = ref({
// 	dwmc: '名称名称名称',
// 	fzpq: '名称',
// 	dyxx: [
// 		{
// 			name: '张xx（队长）',
// 			phone: '12345678901',
// 		},
// 		{
// 			name: '张xx（队长）',
// 			phone: '12345678901',
// 		},
// 		{
// 			name: '张xx（队长）',
// 			phone: '12345678901',
// 		},
// 		{
// 			name: '张xx（队长）',
// 			phone: '12345678901',
// 		},
// 	],
// 	xcpl: ['08:00-09:00', '16:00-17:00'],
// 	xcrw: ['1.检查网络内安全设施', '2.危险品存放是否正确', '3.装置设备是否有异响'],
// });

const back = () => {
	router.replace({ path: '/home' });
};
function logOut() {
	userStore.logout();
}
</script>

<template>
	<div class="create-unit-page">
		<nut-navbar title="巡查队详情" left-show @click-back="back"></nut-navbar>
		<nut-form ref="formRef" :model-value="form">
			<nut-form-item>
				<div class="basedata-form-title">基本信息</div>
			</nut-form-item>
			<nut-form-item prop="dwmc" label="队伍名称">
				<nut-input v-model="form.teamName" placeholder="请输入" type="text" readonly> </nut-input>
			</nut-form-item>
			<nut-form-item prop="fzpq" label="负责片区">
				<nut-input v-model="form.gridName" placeholder="请输入" type="text" readonly> </nut-input>
			</nut-form-item>
			<!-- <nut-form-item prop="dyxx" label="队员信息">
				<div class="message">
					<div v-for="item in form.dyxx" :key="item.name" mb-1>
						<span>{{ item.name }}</span
						><span pl-4>{{ item.phone }}</span>
					</div>
				</div>
			</nut-form-item> -->
			<!-- <nut-form-item label="巡查频率">
				<div h-14 overflow-x-scroll overflow-y-scroll>
					<div v-for="(item, index) in form.xcpl" :key="index" class="text-[#1c2023]" mb-1>{{ item }}</div>
				</div>
			</nut-form-item> -->
      <nut-form-item label="巡查开始时间">
				<div overflow-x-scroll overflow-y-scroll>
					<div class="text-[#1c2023]" mb-1>{{ form.patrolPlanStartTime }}</div>
				</div>
			</nut-form-item>
      <nut-form-item label="巡查结束时间">
				<div overflow-x-scroll overflow-y-scroll>
					<div class="text-[#1c2023]" mb-1>{{ form.patrolPlanEndTime }}</div>
				</div>
			</nut-form-item>
			<nut-form-item label="巡查任务">
				<div h-20 overflow-x-scroll overflow-y-scroll>
					<div class="text-[#1c2023]" mb-1>{{ form.patrolTask }}</div>
				</div>
			</nut-form-item>
			<div>
				<div mb-2 pl-4 text-xs mt-5>巡查路线</div>
				<div p-4 h-50 w-full><img src="" alt="" h-full w-full /></div>
			</div>

			<nut-form-item>
				<nut-button block class="create-unit-submit-button" @click="logOut"> 退出登录 </nut-button>
			</nut-form-item>
		</nut-form>
	</div>
</template>

<style scoped lang="scss">
.create-unit-page {
	display: flex;
	flex-direction: column;
	width: 100vw;
	--nut-cell-color: #000;
	--nut-cell-box-shadow: 0;
	--nut-form-item-label-font-size: 12px;
	--nut-input-border-bottom: #588bff 1px;
	--nut-checkbox-label-color: #606266;
	--nut-checkbox-label-font-size: 12px;
	--nut-primary-color: #165dff;
	--nut-input-font-size: 12px;
	--nut-navbar-title-font: 16px;
	--nut-icon-line-height: 20px;
	.nut-form {
		.nut-form-item {
			margin-bottom: 5px;
			border-bottom: 1px solid #e3e4e5;
		}
		.validity-upload-title {
			font-size: 14px;
			color: #000;
			span {
				font-size: 12px;
				color: #909399;
			}
		}
		.validity-uploader {
			margin-top: 20px;
		}
		.selector-box {
			color: #000;
			font-size: 12px;
			display: flex;
			justify-content: space-between;
			span {
				color: #929292;
			}
		}
		.basedata-form-title {
			font-size: 14px;
			color: #000;
		}
	}
	.create-unit-submit-button {
		height: 35px;
		font-size: 14px;
		color: #165dff;
		border: 1px solid #034196;
		border-radius: 16px;
	}
	.message {
		height: 100px;
		overflow-y: scroll;
		overflow-x: scroll;
		color: #1c2023;
	}
}
</style>
